#pragma once

#include <string>
#include <map>
using namespace std;

#include "Observer.h"

class FishImpl;

class Fish : public Observer {
	friend class FishFactory;
	
public:
	void eat();
	virtual void debug() const;
	void pausePlay();
	void update(Subject *chngSub, const string& command);
	virtual const string& getTypeStr() const;

	typedef void (Fish::*updateHandle)();
protected:

private:
	Fish(FishImpl& fish_impl);
	virtual ~Fish();
	FishImpl *fishImpl;

	void debugHandle() {debug();};
	map<const string, Fish::updateHandle> funcMap; 
};